namespace NFreeMarker.Core
{
    /**
     * @version $Id: NoEscapeBlock.java,v 1.1 2003/04/22 21:05:04 revusky Exp $
     * @author Attila Szegedi
     */

    public class NoEscapeBlock : TemplateElement // NOTE: Was internal
    {
        internal NoEscapeBlock(TemplateElement nestedBlock)
        {
            NestedBlock = nestedBlock;
        }

        internal override void Accept(Environment env)
        {
            if (NestedBlock != null)
            {
                env.Visit(NestedBlock);
            }
        }

        public override string GetCanonicalForm()
        {
            return "<#noescape>" + NestedBlock.GetCanonicalForm() + "</#noescape>";
        }

        public override string GetDescription()
        {
            return "noescape block";
        }
    }
}